using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.Query;

namespace NBusiness.Data.Providers.SqlServer.Query
{
    public class SqlIn : SqlBoolean
    {
        public bool Not
        {
            get { return Operator == SqlBooleanOperator.NotIn; }
            set { Operator = (value ? SqlBooleanOperator.NotIn : SqlBooleanOperator.In); }
        }

        public SqlIn() 
            : base(null, SqlBooleanOperator.In, null)
        { }

        public SqlIn(IEvaluatable left, IEvaluatable right)
            : this(left, right, false)
        { }

        public SqlIn(IEvaluatable left, IEvaluatable right, bool not)
            : base(left, (not ? SqlBooleanOperator.NotIn : SqlBooleanOperator.In), right)
        { }
    }
}
